string = '学Python,来黑马程序员,月薪过万'
reversed_string = string[::-1]
# print(string)
# print(reversed_string)

# ----以上是测试----
my_string = '万过薪月,员序程马黑来,nohtyP学'
# 请以学过的任何方式，得到黑马程序员

# way1
reversed_string = my_string[::-1]
loc = reversed_string.index('来')
# print(loc)
print(reversed_string[loc+1:loc+6])

# way2
substrings = my_string.split(',')
result2 = substrings[1].replace('来', '')[::-1]
print(result2)